#ifndef EANIMATION_H
#define EANIMATION_H

#include <QObject>
#include "../Engine_global.h"

class ENGINESHARED_EXPORT EAnimation : public QObject
{
    Q_OBJECT
public:
    void play();
    void pause();
    bool isPaused() const;
    void setLoop(bool bLoop);
    bool isLoop() const;
    bool isFinished() const;
    void setFinished(bool bFinished);

    virtual void reset() = 0;
    virtual void update(float dt) = 0;

    virtual void enter();
    virtual void exit();
protected:
    explicit EAnimation();
private:
    bool m_bFinished;
    bool m_bPaused;
    bool m_bLoop;
signals:
    void finished();
    void loopFinished();
public slots:
    
};

#endif // EANIMATION_H
